package com.meetingshow.commu.uiservice.model;

import java.util.Date;

import com.meetingshow.common.base.uiservice.model.BaseVO;
import com.meetingshow.commu.dao.model.AnswerPO;

public class AnswerVO extends BaseVO {
    /**
     * 
     */
    private static final long serialVersionUID = -3125283863530638346L;
    
    private Integer answerId;
    private Integer topicId;
    private String topicName;
    private String content;
    private Date createTime;
    private Integer fromUserId;
    private String fromUserName;
    private QuestionVO question;
    private Integer toUserId;
    private String toUserName;
    private String toWeiboName;
    private String statusId;
    
    public AnswerVO() {
    }
    
    public AnswerVO(AnswerPO answerPO) {
        setAnswerId(answerPO.getAnswerId());
        setTopicId(answerPO.getTopicId());
        setTopicName(answerPO.getTopicName());
        setContent(answerPO.getContent());
        setCreateTime(answerPO.getCreateTime());
        setFromUserId(answerPO.getFromUserId());
        setFromUserName(answerPO.getFromUserName());
        setQuestion(new QuestionVO(answerPO.getQuestion()));
        setToUserId(answerPO.getToUserId());
        setToUserName(answerPO.getToUserName());
        setToWeiboName(answerPO.getToWeiboName());
        setStatusId(answerPO.getStatusId());
    }
    
    public AnswerPO toAnswerPO() {
        AnswerPO answerPO = new AnswerPO();
        
        answerPO.setAnswerId(getAnswerId());
        answerPO.setTopicId(getTopicId());
        answerPO.setTopicName(getTopicName());
        answerPO.setContent(getContent());
        answerPO.setCreateTime(getCreateTime());
        answerPO.setFromUserId(getFromUserId());
        answerPO.setFromUserName(getFromUserName());
        answerPO.setQuestion(getQuestion().toQuestionPO());
        answerPO.setToUserId(getToUserId());
        answerPO.setToUserName(getToUserName());
        answerPO.setToWeiboName(getToWeiboName());
        answerPO.setStatusId(getStatusId());
        
        return answerPO;
    }

    public Integer getAnswerId() {
        return answerId;
    }

    public void setAnswerId(Integer answerId) {
        this.answerId = answerId;
    }

    public Integer getTopicId() {
        return topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getFromUserId() {
        return fromUserId;
    }

    public void setFromUserId(Integer fromUserId) {
        this.fromUserId = fromUserId;
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public QuestionVO getQuestion() {
        return question;
    }

    public void setQuestion(QuestionVO question) {
        this.question = question;
    }

    public Integer getToUserId() {
        return toUserId;
    }

    public void setToUserId(Integer toUserId) {
        this.toUserId = toUserId;
    }

    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public String getToWeiboName() {
        return toWeiboName;
    }

    public void setToWeiboName(String toWeiboName) {
        this.toWeiboName = toWeiboName;
    }
    
    public String getStatusId() {
        return statusId;
    }

    public void setStatusId(String statusId) {
        this.statusId = statusId;
    }
}
